package Dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * @author fly
 * @create 2021--04--25--14:29
 */
public class DaiLi implements InvocationHandler {
    private Object jinXiao;
    DaiLi(Object jinXiao){
        this.jinXiao=jinXiao;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("销售开始： 我是："+this.getClass().getSimpleName());
        method.invoke(jinXiao,args);
        System.out.println("销售结束");
        return null;
    }
}
